<!-- HTML header for doxygen 1.8.3.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>Sifteo SDK: Sifteo::AssetAudio Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-style-overrides.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<center>
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Sifteo SDK" src="sdk_logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">
   &#160;<span id="projectnumber">v1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
</center>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Home</span></a></li>
      <li><a href="pages.html"><span>Guides</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>Sifteo</b></li><li class="navelem"><a class="el" href="struct_sifteo_1_1_asset_audio.html">AssetAudio</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="struct_sifteo_1_1_asset_audio-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Sifteo::AssetAudio Struct Reference<div class="ingroups"><a class="el" href="group__assets.html">Assets</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>An audio asset, using any supported compression codec.  
 <a href="struct_sifteo_1_1_asset_audio.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="asset_2audio_8h_source.html">sifteo/asset/audio.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a99caa7d09c00d633d0280eeafc017554"><td class="memItemLeft" align="right" valign="top">unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_asset_audio.html#a99caa7d09c00d633d0280eeafc017554">speed</a> () const </td></tr>
<tr class="memdesc:a99caa7d09c00d633d0280eeafc017554"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the default speed for this audio asset, in samples per second.  <a href="#a99caa7d09c00d633d0280eeafc017554">More...</a><br/></td></tr>
<tr class="separator:a99caa7d09c00d633d0280eeafc017554"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ae01f4b5e1d6359e6047674d00a43830f"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="struct_sifteo_1_1_asset_audio.html">AssetAudio</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_asset_audio.html#ae01f4b5e1d6359e6047674d00a43830f">fromPCM</a> (const int16_t *samples, unsigned numSamples)</td></tr>
<tr class="memdesc:ae01f4b5e1d6359e6047674d00a43830f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an <a class="el" href="struct_sifteo_1_1_asset_audio.html" title="An audio asset, using any supported compression codec.">AssetAudio</a> object programmatically, from uncompressed PCM data.  <a href="#ae01f4b5e1d6359e6047674d00a43830f">More...</a><br/></td></tr>
<tr class="separator:ae01f4b5e1d6359e6047674d00a43830f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab08a3ed503b8b71fb597050593078f0c"><td class="memTemplParams" colspan="2"><a class="anchor" id="ab08a3ed503b8b71fb597050593078f0c"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:ab08a3ed503b8b71fb597050593078f0c"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="struct_sifteo_1_1_asset_audio.html">AssetAudio</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_asset_audio.html#ab08a3ed503b8b71fb597050593078f0c">fromPCM</a> (const T &amp;samples)</td></tr>
<tr class="memdesc:ab08a3ed503b8b71fb597050593078f0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Templatized version of <a class="el" href="struct_sifteo_1_1_asset_audio.html#ae01f4b5e1d6359e6047674d00a43830f" title="Create an AssetAudio object programmatically, from uncompressed PCM data.">fromPCM()</a>, for fixed-size sample arrays. <br/></td></tr>
<tr class="separator:ab08a3ed503b8b71fb597050593078f0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>An audio asset, using any supported compression codec. </p>
<p><code>stir</code> generates an <a class="el" href="struct_sifteo_1_1_asset_audio.html" title="An audio asset, using any supported compression codec.">AssetAudio</a> for each <code>sound</code> element in your assets.lua configuration file, most often from a WAV source file.</p>
<p>See the <a class="el" href="audio.html">Audio</a> and <a class="el" href="asset_workflow.html">Asset Workflow</a> guides for details. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ae01f4b5e1d6359e6047674d00a43830f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="struct_sifteo_1_1_asset_audio.html">AssetAudio</a> Sifteo::AssetAudio::fromPCM </td>
          <td>(</td>
          <td class="paramtype">const int16_t *&#160;</td>
          <td class="paramname"><em>samples</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>numSamples</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create an <a class="el" href="struct_sifteo_1_1_asset_audio.html" title="An audio asset, using any supported compression codec.">AssetAudio</a> object programmatically, from uncompressed PCM data. </p>
<p>This creates an <a class="el" href="struct_sifteo_1_1_asset_audio.html" title="An audio asset, using any supported compression codec.">AssetAudio</a> instance which references the specified buffer of 16-bit uncompressed PCM samples. You can use this to wrap dynamically synthesized audio data for playback on an <a class="el" href="struct_sifteo_1_1_audio_channel.html" title="One mixer channel, capable of playing AudioAssets.">AudioChannel</a>.</p>
<p>This is intended mostly for creating software "instruments" for real-time audio synthesis, so we default to looping mode, and there is no default sample rate or volume. These parameters can all be set via <a class="el" href="struct_sifteo_1_1_audio_channel.html" title="One mixer channel, capable of playing AudioAssets.">AudioChannel</a> at runtime. </p>

</div>
</div>
<a class="anchor" id="a99caa7d09c00d633d0280eeafc017554"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned Sifteo::AssetAudio::speed </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the default speed for this audio asset, in samples per second. </p>
<p>This can be used to calculate a new speed for <a class="el" href="struct_sifteo_1_1_audio_channel.html#a075fb9a950a3a4aab9fe421f359731b8" title="Sets the speed of this channel, in samples per second.">AudioChannel::setSpeed()</a>. </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="asset_2audio_8h_source.html">asset/audio.h</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.3.1-->
<!-- start footer part -->
    <hr class="footer"/>
    <address class="footer">
        <p><a href="http://sifteo.com">Sifteo</a> SDK v1.0.0 <small>(see <a href="https://developers.sifteo.com/sifteosdk">all versions</a>)</small></p>
        <p>Last updated Wed Mar 27 2013, by <a href="http://www.stack.nl/~dimitri/doxygen">Doxygen</a></p>
    </address>
</body>
</html>
